package one.stand.service.impl.checkparam;

import one.stand.request.CompanyCustomerLableRequest;
import org.springframework.util.StringUtils;

/**
 * 客户标签入参验证
 * @author Administrator
 */
public class CompanyCustomerLableServiceCheckParam {

    /**
     * 添加客户标签id
     * @param request
     * @return
     */
    public static boolean add(CompanyCustomerLableRequest request){
        if(StringUtils.isEmpty(request.getLableName())||request.getParentId()==null){
            return true;
        }
        if(request.getParentId()!=0){
            if(StringUtils.isEmpty(request.getLableColor())){
                return true;
            }
        }
        return false;
    }
}
